import Request from "@/utils/request";
import { Toast } from "vant";

export default {
    
    // 获取店员列表
    staffList: (data: any) => {
        return Request.get("clerk/listAll", data);
    },

    // 获取验证码
    staffSmsCode: (data: any) => {
        return Request.post("sms/auth/clerk/add", data).then(
            (respData: any) => {
                if (!respData) {
                    return respData;
                }
                Toast(respData.content);
            }
        );
    },

    // 店员添加
    staffAdd: (data: any) => {
        return Request.postWithLoading("clerk/add", data);
    },
};
